<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal"
  aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span *ngIf="maintenance.id">编辑假期检修</span>
            <span *ngIf="!maintenance.id">创建新的假期检修</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="form-group">
            <label style="display: block;">时间区间 *</label>
            <p-calendar [(ngModel)]="beginDate" name="beginDate" dateFormat="yy年m月d日" [locale]="primengCalendarHelper['zh-CN']"
              [utc]="'true'" [inputStyle]="{'width':'360px','height':'40px', 'padding-left':'20px'}" [inputStyleClass]="'form-control'"
              required></p-calendar>
            ---
            <p-calendar [(ngModel)]="endDate" [minDate]="beginDate" name="endDate" dateFormat="yy年m月d日"
              [locale]="primengCalendarHelper['zh-CN']" [utc]="'true'" [inputStyleClass]="'form-control'" [inputStyle]="{'width':'360px','height':'40px', 'padding-left':'20px'}"
              required></p-calendar>
          </div>

          <div class="form-group">
            <label for="maintenanceName">检修说明</label>
            <textarea id="maintenanceName" class="form-control" type="text" name="maintenanceName" [(ngModel)]="maintenance.maintenanceName" rows="3"></textarea>
          </div>

          <div class="form-group">
            <label for="remark">备注</label>
            <textarea id="remark" class="form-control" type="text" name="remark" [(ngModel)]="maintenance.remark" rows="3"></textarea>
          </div>
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{l("Cancel")}}</button>
          <button type="submit" class="btn btn-primary" [disabled]="!editForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
        </div>
      </form>
    </div>
  </div>
</div>
